//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
//     Copyright (c) Telligent Systems Corporation.  All rights reserved.
// </copyright> 
//------------------------------------------------------------------------------

using System;
using CommunityServer.Components;

namespace CommunityServer.Galleries.Components
{
	/// <summary>
	/// Image and disk quotas for image galleries according to the roles of the owner
	/// </summary>
	public class GalleryRoleQuota
	{
		public GalleryRoleQuota(Guid id)
		{
			Role role = Roles.GetRole(id);

			if(role != null)
			{
				name = role.Name;
			}
			roleID = id;
			imageQuota = -1;
			diskQuota = -1;
		}

		#region Fields
		Guid roleID;
		string name;
		int imageQuota;
		int diskQuota;
		#endregion

		#region Public Properties
		public Guid RoleID
		{
			get
			{
				return roleID;
			}
			set
			{
				roleID = value;
			}
		}

		public string Name
		{
			get
			{
				return name;
			}
			set
			{
				name = value;
			}
		}

		public int ImageQuota
		{
			get
			{
				return imageQuota;
			}
			set
			{
				imageQuota = value;
			}
		}

		public int DiskQuota
		{
			get
			{
				return diskQuota;
			}
			set
			{
				diskQuota = value;
			}
		}
		#endregion
	}
}
